<?php

function computePercentage($start, $target, $current) {
	if ($start == "no" && $target == "yes") {
		if ($current == "yes") {
			return 100;
		}
		return 0;
	}

	if ($target == $start) {
		return 100;
	}
	return abs($current - $start) * 100 / abs($target - $start);
}
?>